package com.liliudong.template.common.entity.sys;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.liliudong.template.common.constant.SysMenuTypeEnum;
import com.liliudong.template.common.constant.SysMenuVisibleEnum;
import com.liliudong.template.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 系统菜单
 *
 * @author ldli5
 * @date 2024/06/18
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName(value = "sys_menu")
public class SysMenu extends BaseEntity {

    /**
     * 组件路径 相对路径是 views
     */
    @TableField(value = "component")
    private String component;

    /**
     * 图标
     */
    @TableField(value = "icon")
    private String icon;

    /**
     * 名称
     */
    @TableField(value = "`name`")
    private String name;

    /**
     * 父级ID
     */
    @TableField(value = "parent_id")
    private Long parentId;

    /**
     * 权限标识符
     */
    @TableField(value = "permission")
    private String permission;

    /**
     * 排序
     */
    @TableField(value = "sort")
    private Integer sort;

    /**
     * 类型 1 目录 2菜单 3按钮
     */
    @TableField(value = "`type`")
    private SysMenuTypeEnum type;

    /**
     * 可见的 1可见 0隐藏
     */
    @TableField(value = "visible")
    private SysMenuVisibleEnum visible;


}